package cn.com.surker.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 消息推送记录
 * </p>
 *
 * @author admin
 * @since 2022-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysMessageRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 姓名
     */
    private String name;

    /**
     * 电话
     */
    private String phone;

    /**
     * 微信appid
     */
    private String appid;

    /**
     * 微信openid
     */
    private String openid;

    /**
     * 公司ID
     */
    private Long orgId;

    /**
     * 公司名称
     */
    private String orgName;

    /**
     * 推送类型(0:企业微信1:微信小程序2:微信公众号)
     */
    private Integer sendType;

    /**
     * 是否已读(0：已读,1：未读)
     */
    private Integer isLook;

    /**
     * 消息标题
     */
    private String title;

    @TableField(exist = false)
    private String titleColor;

    /**
     * 消息内容
     */
    private String content;

	@TableField(exist = false)
    private String contentColor;

    /**
     * 消息类型(0:文本消息,1:链接消息)
     */
    private Integer messageType;

    /**
     * 状态(0：企业1：禁用)
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    @TableField(exist = false)
    private String remarkColor;

    /**
     * 推送时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    public SysMessageRecord(){}
    public SysMessageRecord(String username, String name, String phone, String appid, String openid, Long orgId,
                            String orgName, Integer sendType, Integer isLook, String title, String titleColor,
                            String content, String contentColor, Integer messageType, Integer status, String remark,
                            String remarkColor, Date createTime) {
        this.username = username;
        this.name = name;
        this.phone = phone;
        this.appid = appid;
        this.openid = openid;
        this.orgId = orgId;
        this.orgName = orgName;
        this.sendType = sendType;
        this.isLook = isLook;
        this.title = title;
        this.titleColor = titleColor;
        this.content = content;
        this.contentColor = contentColor;
        this.messageType = messageType;
        this.status = status;
        this.remark = remark;
        this.remarkColor = remarkColor;
        this.createTime = createTime;
    }
}
